import { lazy } from 'react';
import Login from '@/pages/Login';
import lazyRoute from '@/router/components/LazyRoute';
import Error404 from '@/router/components/Error404';
import ExampleRouter from './example';
const Index = lazy(() => import('@/pages/Index'));
const Main = lazy(() => import('@/pages/Main'));

const router = [
    {
        path: '/',
        element: <Login />,
    },
    {
        path: '/app',
        element: lazyRoute(<Main />),
        children: [
            {
                path: 'index',
                element: lazyRoute(<Index />),
                breadcrumb: '首页',
            },
            ...ExampleRouter,
        ],
    },
    {
        path: '*',
        element: <Error404 />,
    },
];

export default router;
